import sys
inp= raw_input("Nhap dia chi file input:\n")

try:
    f = open(inp)
    s = f.read()
    i =s.strip().swapcase()
except IOError:
    print "File not found"
except:
    print "Unexpected error:", sys.exc_info()[0]
    raise
outp= raw_input("Nhap dia chi file output:\n")
outputFile = open(outp, 'w')
outputFile.write(i)
outputFile.close()